﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;


namespace Entetities
{
    public class SanPham
    {        
        public int Masanpham { get; set; }
        public string Tensanpham { get; set; }
        public decimal Giaban { get; set; }
        public string Motasanpham { get; set; }
        public int Manhom { get; set; }
        public int Manhasanxuat { get; set; }
        public int Tonkho { get; set; }
        public SanPham()
        {}
        public SanPham(int Masanpham, string Tensanpham, decimal Giaban, string Motasanpham, int Manhom, int Manhasanxuat, int Tonkho)
        {
            this.Masanpham = Masanpham;
            this.Tensanpham = Tensanpham;
            this.Giaban = Giaban;
            this.Motasanpham = Motasanpham;
            this.Manhom = Manhom;
            this.Manhasanxuat = Manhasanxuat;
            this.Tonkho = Tonkho;
        }
        public override bool Equals(object obj)
        {
            SanPham sp = (SanPham)obj;
            bool result = this.Masanpham.Equals(sp.Masanpham);
            return result;
        }
        public override int GetHashCode()
        {
            return this.Masanpham.GetHashCode();
        }

    }
}
